<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 		<link rel="stylesheet" href="http://design.rtve.int/beatrizjc/trato/style.css" type="text/css" media="screen" /> -->
		<link href="/trato/resources/css/style.css" rel="stylesheet"/>
		<script src="/trato/resources/js/jquery-1.11.0.min.js"></script>
		<script src="/trato/resources/js/cliente/show.js"></script>
	</head>
	<body>
	
		<c:import url="header.jsp" />
		
		<h3><fmt:message key="cliente.manageLists"/></h3>
		
		<div class="card">
			<span><a href="createList"><fmt:message key="cliente.addList"/></a></span>
		</div>
		
		<table class="panel_user lista">
			<thead>
				<tr class="headerCol">
					<td><fmt:message key="cliente.panel.listName"/></td>
					<td><fmt:message key="cliente.panel.action"/></td>
				</tr>
			</thead>
			<c:forEach var="lista" items="${listas}">
				<tr id="${lista.id}">
					<td><c:out value="${lista.nombre}"/></td>
					<td id="botones">
						<input type="button" class="edit" title="<fmt:message key="cliente.editList"/>" onclick="editarLista(${lista.id});" />
						<input type="button" class="delete" title="<fmt:message key="cliente.removeList"/>" onclick="eliminarLista(${lista.id});" />
					</td>
				</tr>
			</c:forEach>
		</table>
		<div class="pagination">
			<c:if test="${page>1}">
				<span><a href="home?page=${page-1}"><fmt:message key="pagination.prev"/></a></span>
			</c:if>
			<span><fmt:message key="pagination.page"/><em><c:out value="${page}" /></em><fmt:message key="pagination.of"/><em><c:out value="${totalPages}" /></em></span>
			<input type="hidden" id="page" name="page" value="${page}"/>
			<c:if test="${totalPages>page}">
				<span><a href="home?page=${page+1}"><fmt:message key="pagination.next"/></a></span>
			</c:if>
		</div>
	</body>
</html>